﻿<?
	include '../inc/config.php';
	session_start();
	extract($_POST);
	extract($_GET);
	unset($_POST,$_GET);
	if (isset($passwd) && $passwd == $PasswdAdmin){
		$_SESSION['user']=1;
		$_SESSION['logname']="Admin";
		$_SESSION['admin']=1;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>管理单</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">-->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script type="text/javascript">
function goTopEx() {
    var obj = document.getElementById("goTopBtn");
    function getScrollTop() {  
        return document.documentElement.scrollTop + document.body.scrollTop;  
    }  
    function setScrollTop(value) {
        if (document.documentElement.scrollTop) {
            document.documentElement.scrollTop = value;
        } else {  
            document.body.scrollTop = value;
        }
    }
    window.onscroll = function() {
        getScrollTop() > 0 ? obj.style.display = "": obj.style.display = "none";  
    }
    obj.onclick = function() {  
        var goTop = setInterval(scrollMove, 10);
        function scrollMove() {
            setScrollTop(getScrollTop() / 1.1);
            if (getScrollTop() < 1) clearInterval(goTop);
        }
    }
}
</script>
<style>
	BODY {
		HEIGHT: auto;
	}
	#goTopBtn {
		POSITION: fixed; TEXT-ALIGN: center; LINE-HEIGHT: 30px; WIDTH: 30px; BOTTOM: 35px; 
		HEIGHT: 33px; FONT-SIZE: 12px; CURSOR: pointer; RIGHT: 0px; _position: absolute; _right: auto  
	}
</style>

</head>
<body class="background">
<div style="display: none" id="goTopBtn"><img border=0 src="/image/top.jpg"></div>
<script type=text/javascript>goTopEx();</script>
<?	include "admin_top.php";
	switch($name){
		case "issue":
			include "admin_issue.php";
			break;
		case "version":
			include "admin_ver.php";
			break;
		case "wiki":
			include "admin_wiki.php";
			break;
		case "users":
			include "admin_users.php";
			break;
		case "project":
			include "admin_project.php";
			break;
		case "daily":
			include "daily_report.php";
			break;
		case "kpi":
			include "admin_kpi.php";
			break;
		case "repo":
			include "admin_repo.php";
			break;
		case "ad":
			include "admin_ad.php";
			break;
		case "file":
			include "admin_file.php";
			break;
		case "mail":
			include "admin_mail.php";
			break;
		case "gmmaker":
			include "admin_gmmaker.php";
			break;
		case "weekly":
			include "admin_weekly.php";
			break;
		default:
			echo '<div class="container">欢迎您来到管理页面！请点击上面的相应内容进行管理，谢谢合作~</div>';
	}
	include '../bottom.php';
	$db->close();
?>
</body>
</html>